﻿#pragma once
#include "SCircularArc.h"
#include "Components/Widget.h"
#include "UCircularArcUMG.generated.h"

UCLASS()
class UCircularArcUMG: public UWidget
{
	GENERATED_BODY()
public:
	UCircularArcUMG();
	
	//加载界面
	virtual TSharedRef<SWidget> RebuildWidget() override;
	//UMG列表栏
	virtual const FText GetPaletteCategory() ;
	
	//面板设置完毕后会触发此事件,字面的意思是同步属性
	virtual void SynchronizeProperties() override;
	//资源释放
	virtual void ReleaseSlateResources(bool bReleaseChildren) override;
	//更新信息
	
	UFUNCTION(BlueprintCallable, Category = "Appearance")
	void UpDataList(int Value);
public:
	TSharedPtr<SCircularArc> CircularArc;

	//圆环距离圆心的距离
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆环距离圆心的距离"))
	float radius;
	//圆环的宽度
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "圆环的宽度"))
	float LoopWidth;
	//椭圆的圆心X
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "椭圆的圆心X"))
	float CenterX;
	//椭圆的圆心Y
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "椭圆的圆心Y"))
	float CenterY;
	//背景颜色
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "背景颜色"))
	FLinearColor BkColor;
	//开始的角度
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "开始的角度"))
	float BeginAngle;
	//结束的角度
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "结束的角度"))
	float EndAngle;
	//最大值
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "最大值"))
	float MaXValue;
	//需要绘制的圆弧
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "需要绘制的圆弧"))
	float DrawValue;
	//绘制的颜色
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "绘制的颜色"))
	FLinearColor DrawColor;
	//使用自定义颜色
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (DisplayName = "使用自定义颜色"))
	bool UseDefaultColor;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "自定义参数", meta = (ClampMin = 1, ClampMax = 100,DisplayName = "清晰度"))
	int Definition;
};
